-
Notifications
You must be signed in to change notification settings - Fork 56
test: add ignore() context manager test coverage #832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add ignore() context manager test coverage #832
Conversation
- Add ignore() tests to all test classes that previously only tested strict() - Use get_collections() for ignore() tests since it emits warnings (unlike search() which raises exceptions directly) - Achieve 100% coverage for warnings.py module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on increasing the test coverage! But I don't think these make sense as additions to preexisting search API tests. Maybe they deserve their own class for get_collections
. Also you might need to add an ignore to cover the ResourceWarning
that is showing up in CI
- Add ignore() tests to all test classes that previously only tested strict() - Use get_collections() for ignore() tests since it emits warnings (unlike search() which raises exceptions directly) - Achieve 100% coverage for warnings.py module
Remove all ignore() test blocks that were mixed with API tests. These tests now belong in the dedicated test_warnings.py file.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #832 +/- ##
==========================================
+ Coverage 93.43% 95.06% +1.63%
==========================================
Files 13 15 +2
Lines 990 1217 +227
==========================================
+ Hits 925 1157 +232
+ Misses 65 60 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ignore ResourceWarning and PytestUnraisableExceptionWarning to prevent CI failures from pre-existing unclosed socket warnings that are not related to our warning context manager tests.
26bf119
to
5221373
Compare
Add entry documenting the comprehensive test coverage added for ignore() and strict() context managers in PR stac-utils#832.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Just one little comment, but looks good!
Related Issue(s):
Description:
PR Checklist: